#!/usr/bin/python3


def test_tuple():
    tuple2 = ('abcd', 786, 2.23, 'runoob', 70.2)
    tiny_tuple = (123, 'runoob')
    print(tuple2)  # 输出完整元组
    print(tuple2[0])  # 输出元组的第一个元素
    print(tuple2[1:3])  # 输出从第二个元素开始到第三个元素
    print(tuple2[2:])  # 输出从第三个元素开始的所有元素
    print(tiny_tuple * 2)  # 输出两次元组
    print(tuple2 + tiny_tuple)  # 连接元组


if __name__ == "__main__":
    test_tuple()
